package cn.growthgate.fgo.entity;

import com.baomidou.mybatisplus.enums.IdType;

import cn.growthgate.fgo.entity.enums.ItemRare;
import cn.growthgate.fgo.entity.enums.ItemType;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 道具
 * </p>
 *
 * @author GrowthGate
 * @since 2019-05-13
 */
@TableName("t_data_item")
public class Item extends Model<Item> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 类型
	 */
	@NotNull(message = "类型不能为空")
	private ItemType type;

	/**
	 * 稀有度
	 */
	@NotNull(message = "稀有度不能为空")
	private ItemRare rare;

	/**
	 * 名称
	 */
	@NotBlank(message = "名称不能为空")
	private String name;

	/**
	 * 日文名称
	 */
	private String jName;

	/**
	 * 英文名称
	 */
	private String eName;

	/**
	 * 别称
	 */
	private String nickname;

	/**
	 * 图片
	 */
	private String image;

	/**
	 * 描述
	 */
	private String description;

	/**
	 * 排序
	 */
	private Integer sort;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public ItemType getType() {
		return type;
	}

	public void setType(ItemType type) {
		this.type = type;
	}

	public ItemRare getRare() {
		return rare;
	}

	public void setRare(ItemRare rare) {
		this.rare = rare;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getjName() {
		return jName;
	}

	public void setjName(String jName) {
		this.jName = jName;
	}

	public String geteName() {
		return eName;
	}

	public void seteName(String eName) {
		this.eName = eName;
	}

	/**
	 * @return nickname
	 */
	public String getNickname() {
		return nickname;
	}

	/**
	 * @param nickname
	 *            要设置的 nickname
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return sort
	 */
	public Integer getSort() {
		return sort;
	}

	/**
	 * @param sort
	 *            要设置的 sort
	 */
	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Item [id=" + id + ", type=" + type + ", rare=" + rare + ", name=" + name + ", nickname=" + nickname
				+ ", jName=" + jName + ", eName=" + eName + ", image=" + image + ", description=" + description
				+ ", sort=" + sort + "]";
	}

}
